/* 智能化灌溉面板样式 */
.smart-irrigation-panel {
    padding: 20px;
    background: #fff;
}

/* 实时数据大屏 */
.realtime-dashboard {
    margin-bottom: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.dashboard-header h2 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-header h2 i {
    color: #4CAF50;
}

.dashboard-controls {
    display: flex;
    gap: 12px;
}

.refresh-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 0.9rem;
}

.refresh-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.view-mode {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    font-size: 0.9rem;
}

/* 核心指标卡片 */
.core-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.metric-card.primary {
    background: #f1f8e9;
    border-color: #c5e1a5;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4CAF50;
}

.primary .metric-icon {
    background: rgba(76, 175, 80, 0.2);
}

.metric-info {
    flex: 1;
}

.metric-info h3 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.unit {
    font-size: 0.85rem;
    color: #666;
    margin-left: 2px;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.metric-trend.positive {
    color: #4caf50;
}

.metric-trend.negative {
    color: #f44336;
}

.metric-trend.stable {
    color: #9e9e9e;
}

/* 监控图表区域 */
.monitoring-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.chart-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
}

.chart-card.large {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.chart-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.btn-group {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.time-btn {
    padding: 4px 10px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
}

.time-btn.active {
    background: #4CAF50;
    color: #fff;
}

.chart-container {
    height: 280px;
    position: relative;
}

/* 智能决策系统 */
.decision-system {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.system-header h2 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-header h2 i {
    color: #4CAF50;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status-tag.normal {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-tag.warning {
    background: #fff3e0;
    color: #ef6c00;
}

.status-tag.error {
    background: #ffebee;
    color: #c62828;
}

/* 决策网格 */
.decision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.decision-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.decision-card.primary {
    border-color: #c5e1a5;
    background: #f9fbe7;
}

.decision-header {
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.decision-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.decision-content {
    padding: 15px;
}

/* 建议框 */
.suggestion-box {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.suggestion-icon {
    font-size: 20px;
    color: #4CAF50;
}

.suggestion-text {
    flex: 1;
    line-height: 1.5;
    color: #333;
    font-size: 0.9rem;
}

.suggestion-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    background: #fff;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.detail-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* 控制面板 */
.control-panel {
    padding: 15px;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.execution-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: #4CAF50;
}

.action-btn.primary:hover {
    background: #43a047;
}

.action-btn.danger {
    background: #f44336;
}

.action-btn.danger:hover {
    background: #e53935;
}

/* 高级控制选项 */
.advanced-controls {
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
}

.control-item {
    margin-bottom: 12px;
}

.control-item:last-child {
    margin-bottom: 0;
}

.control-item label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 0.85rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.value-display {
    min-width: 50px;
    text-align: right;
    color: #666;
    font-size: 0.85rem;
}

.custom-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    font-size: 0.85rem;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .core-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .monitoring-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.large {
        grid-column: span 1;
    }
    
    .decision-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .core-metrics {
        grid-template-columns: 1fr;
    }
    
    .suggestion-details {
        grid-template-columns: 1fr;
    }
} 